home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.0 / Video Toaster v4.0.iso / arexx / switcher / ldrec.rexx < prev    next >
OS/2 REXX Batch file  |  1993-12-13  |  2KB  |  97 lines

  1. /* Record 1 frame on Sony LVR-3000N */
  2. /* Set serial at 9600 8N1, assume LD just turned on, did blank check */
  3. /* By Arnie Cachelin Thu Oct 15 13:38:00 1992 */
  4.  
  5. cmd.0="56" /* All Clear */
  6. cmd.1="EC" /* Color Mode */
  7. cmd.2="EA" /* NTSC Mode */
  8. cmd.3="55" /* Frame # Mode */
  9. cmd.4="E6" /* Frame Rec Mode */
  10. cmd.5="BD" /* Next blank */
  11. cmd.6="E0" /* Rec Standby Mode */
  12. /* This was the setup part */
  13. cmd.7="e0" /* Enter (use current frame as IN) */
  14. cmd.8="40" /* Enter (use current frame as IN) */
  15. cmd.9="e9" /* Enter (no OUT set) */
  16. cmd.10="31" /* 1 Frame DUR */
  17. cmd.11="40" /* Enter (use IN, DUR for 1 frame record) */
  18. cmd.12="E9" /* Record */
  19.  
  20. setupnum=6
  21. cmdnum=9
  22. frames=3
  23. setupstring=""
  24. recordstring=""
  25. if ~open(SerialOut,"SER:","a") then
  26.     do
  27.         say "Can't open serial port SER:."
  28.         exit
  29.     end
  30. else
  31.     do i=0 to setupnum
  32.         s="command "i" Sent hex byte "cmd.i
  33. /*         writech(SerialOut,x2c(cmd.i)) */
  34.             setupstring=setupstring||x2c(cmd.i)
  35.         say s
  36.     end
  37.   say setupstring
  38. /*     writeln(SerialOut,setupstring) */
  39. /*     do f=0 to frames */
  40.         do i=setupnum+1 to cmdnum
  41.             s="command "i" Sent hex byte "cmd.i
  42. /*             writech(SerialOut,x2c(cmd.i)) */
  43.                 recordstring=recordstring||x2c(cmd.i)
  44.             say s
  45.         end
  46. /*     end */
  47.     do f=0 to frames
  48.       say recordstring
  49.         writeln(SerialOut,recordstring)
  50.     end
  51.  
  52.  
  53. do i=1 to cmdnum
  54.     hexcmd.i=x2c(cmd.i)
  55.     end
  56. hexcmd.6="32152@"
  57. hexcmd.7="32153@"
  58. hexcmd.8="1@"
  59.  
  60. if ~open(SerialOut,"SER:","w") then exit
  61.  
  62. writech(SerialOut,x2c(cmd.1))
  63. writech(SerialOut,x2c(cmd.2))
  64. writech(SerialOut,x2c(cmd.3))
  65. writech(SerialOut,x2c(cmd.4))
  66. writech(SerialOut,x2c(cmd.5))
  67. pull mydick
  68. writech(SerialOut,x2c(cmd.6))
  69. pull mydick
  70. writech(SerialOut,x2c(cmd.7))
  71. pull mydick
  72. writech(SerialOut,x2c(cmd.8))
  73. pull mydick
  74. writech(SerialOut,x2c(cmd.9))
  75. pull mydick
  76. writech(SerialOut,x2c(cmd.10))
  77. pull mydick
  78.  
  79. exit
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.